#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :Contract.py
# @Time      :2024/11/12 19:23
# @Author    :zhou_yi


from datetime import datetime
from pydantic import BaseModel, Field
from typing import Optional
from models.BaseModels import PointBaseModel, ClearWasterRecordBaseModel


class InputCWRS(BaseModel):
    tpl: str
    point: str
    start: datetime
    end: datetime
    really: bool = False


class CWRSPoint(PointBaseModel):
    pass


class CWRSRecord(ClearWasterRecordBaseModel):
    date: str
    time: str


class CWRSummary(BaseModel):
    idx: int  # 增加处理具有真实数据的情况（放在一起按时间顺序排列）
    date: str
    time: str
    w_total: int
    is_really: int


class OutCWRS(BaseModel):
    id: str
    point: str
    long: float = 0.0
    lat: float = 0.0
    name: str = ''
    customID: str = ''
    custom: str = ''
    part: str = ''
    manager: str = ''
    tel: str = ''
    notice: str = ''
    address: str = ''
    code: str = "#"
    records: list[CWRSRecord]
    summary: list[CWRSummary]
    total: int


if __name__ == '__main__':
    ...
